<!DOCTYPE html>
<html>
<head>
    <title>管理员列表</title>
    <#include "/header.html">
</head>
<style>
    #s1 {
        height: 510px;
    }

    #s2 {
        height: 510px;
    }
</style>
<body>
<div id="rrapp" v-cloak>

    <div v-show="!showList" class="panel panel-default" id="s1">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">账号</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" readonly="readonly" v-model="user.username"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">密码</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="user.password" placeholder="密码"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">所属部门</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control"
                           style="cursor:pointer;" v-model="user.deptName" readonly="readonly" @click="deptTree"
                           id="deptName"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">姓名</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="user.name"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">性别</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="user.sex"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">证件类型</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="user.idtype" placeholder="证件类型"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">手机号</div>
                <div class="col-sm-10">
                    <input type="text" pattern="^1[3-9]\d{11}$" class="form-control" v-model="user.mobile"
                           placeholder="手机号"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">邮箱</div>
                <div class="col-sm-10">
                    <input type="email" class="form-control" v-model="user.email" placeholder="邮箱"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-8 control-label"></div>
                <input type="button" class="btn btn-primary" value="确定" style="visibility: hidden"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-primary" @click="saveOrUpdate1" value="更新"/>
            </div>
        </form>
    </div>

    <div v-show="showList" class="panel panel-default" id="s2">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">账号</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" readonly="readonly" v-model="user.username"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">密码</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="user.password" placeholder="密码"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">所属部门</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control"
                           style="cursor:pointer;" v-model="user.deptName" readonly="readonly" id="deptName2"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">姓名</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="user.name"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">性别</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="user.sex"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">证件类型</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="user.idtype" placeholder="证件类型"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">手机号</div>
                <div class="col-sm-10">
                    <input type="text" pattern="^1[3-9]\d{11}$" class="form-control" v-model="user.mobile"
                           placeholder="手机号"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">邮箱</div>
                <div class="col-sm-10">
                    <input type="email" class="form-control" v-model="user.email" placeholder="邮箱"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-8 control-label"></div>
                <input type="button" class="btn btn-primary" value="确定" style="visibility: hidden"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-primary" @click="saveOrUpdate2" value="更新"/>
            </div>
        </form>
    </div>


</div>

<!-- 选择部门 -->
<div id="deptLayer" style="display: none;padding:10px;">
    <ul id="deptTree" class="ztree"></ul>
</div>
<script src="${request.contextPath}/statics/js/common.js?_${.now?long}"></script>
<script src="${request.contextPath}/statics/js/modules/myself/info.js?_${.now?long}"></script>
</body>
</html>